package com.zc.designmodel.behavioral.interpreter;

/**
 * @author: zhuCan
 * @date: 2020/4/15 16:40
 * @description:
 */
public class TerminalExpression implements Expression {

  private String data;

  public TerminalExpression(String data){
    this.data=data;
  }

  @Override
  public boolean interpret(String context) {
    return context.contains(data);
  }
}
